package com.yunti.yntk.manager;

import android.content.Context;
import android.media.MediaPlayer;

import com.yunti.yntk.R;


public class DuManager {
    private static final DuManager instance = new DuManager();
    private Context context;
    private MediaPlayer mediaPlayer;

    public static DuManager getInstance() {
        return instance;
    }

    private DuManager(){

    }

    public void init(Context context){
        this.context = context;
        mediaPlayer = MediaPlayer.create(context, R.raw.du);
    }

    public void du(){
        if (mediaPlayer.isPlaying()) {
            mediaPlayer.stop();
        }
        mediaPlayer = MediaPlayer.create(context, R.raw.du);
        mediaPlayer.start();
    }
}
